package com.ruoyi.system.service.impl.reseller;

import java.util.List;

import com.ruoyi.common.core.domain.entity.CommissionResultMap;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.reseller.VsDramasResellerLogMapper;
import com.ruoyi.system.domain.reseller.VsDramasResellerLog;
import com.ruoyi.system.service.reseller.IVsDramasResellerLogService;

/**
 * 分佣记录Service业务层处理
 * 
 * @author zzx
 * @date 2024-04-27
 */
@Service
public class VsDramasResellerLogServiceImpl implements IVsDramasResellerLogService 
{
    @Autowired
    private VsDramasResellerLogMapper vsDramasResellerLogMapper;

    /**
     * 查询分佣记录
     * 
     * @param id 分佣记录主键
     * @return 分佣记录
     */
    @Override
    public VsDramasResellerLog selectVsDramasResellerLogById(Integer id)
    {
        return vsDramasResellerLogMapper.selectVsDramasResellerLogById(id);
    }

    /**
     * 查询分佣记录列表
     * 
     * @param vsDramasResellerLog 分佣记录
     * @return 分佣记录
     */
    @Override
    public List<VsDramasResellerLog> selectVsDramasResellerLogList(VsDramasResellerLog vsDramasResellerLog)
    {
        return vsDramasResellerLogMapper.selectVsDramasResellerLogList(vsDramasResellerLog);
    }

    /**
     * 新增分佣记录
     * 
     * @param vsDramasResellerLog 分佣记录
     * @return 结果
     */
    @Override
    public int insertVsDramasResellerLog(VsDramasResellerLog vsDramasResellerLog)
    {
        vsDramasResellerLog.setCreatetime(System.currentTimeMillis());
        vsDramasResellerLog.setUpdatetime(System.currentTimeMillis());
        return vsDramasResellerLogMapper.insertVsDramasResellerLog(vsDramasResellerLog);
    }

    /**
     * 修改分佣记录
     * 
     * @param vsDramasResellerLog 分佣记录
     * @return 结果
     */
    @Override
    public int updateVsDramasResellerLog(VsDramasResellerLog vsDramasResellerLog)
    {
        vsDramasResellerLog.setUpdatetime(System.currentTimeMillis());
        return vsDramasResellerLogMapper.updateVsDramasResellerLog(vsDramasResellerLog);
    }

    /**
     * 批量删除分佣记录
     * 
     * @param ids 需要删除的分佣记录主键
     * @return 结果
     */
    @Override
    public int deleteVsDramasResellerLogByIds(Integer[] ids)
    {
        return vsDramasResellerLogMapper.deleteVsDramasResellerLogByIds(ids);
    }

    /**
     * 删除分佣记录信息
     * 
     * @param id 分佣记录主键
     * @return 结果
     */
    @Override
    public int deleteVsDramasResellerLogById(Integer id)
    {
        return vsDramasResellerLogMapper.deleteVsDramasResellerLogById(id);
    }

    @Override
    public CommissionResultMap selectCount(VsDramasResellerLog vsDramasResellerLog) {
        return vsDramasResellerLogMapper.selectCount(vsDramasResellerLog);
    }
}
